package com.neusoft.shopingapi.service;

import com.neusoft.shopingapi.comm.Page;
import com.neusoft.shopingapi.dao.GoodsDAOImpl;
import com.neusoft.shopingapi.entity.GoodsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsService {
    @Autowired
    private GoodsDAOImpl dao;

    public Page<GoodsEntity> queryAll(Page<GoodsEntity> page){
        return dao.queryPage(page);
    }

    public GoodsEntity getGoodsByOne(Integer goodsno){
        return dao.getGoodsByOne(goodsno);
    }
    public List<GoodsEntity> getGoodsByType(Integer typeno){
        return dao.getGoodsByType(typeno);
    }
}
